<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="com.dts.core.dao.*,com.dts.core.model.*,com.dts.core.util.*,com.dts.btisqr.model.*,com.dts.btisqr.dao.*" %>
<%@ page import="java.util.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Solution.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%
       try
       {
          String bugid = request.getParameter("bugid");
          String solution = request.getParameter("solution");
          String membername = (String)session.getAttribute("user");
          
          Bug aBug = new Bug();
          aBug.setBugID(Integer.parseInt(bugid));
          aBug.setSolvedBy(membername);
          aBug.setSolvedDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
          aBug.setSolution(solution);
          
          new BugDAO().setBugSolution(aBug);
          
       }
       catch(Exception e)
       {
			e.printStackTrace();
          LoggerManager.writeLogWarning(e);
       }
        response.sendRedirect("ViewDBugStatus.jsp");
    
     %>
  </body>
</html>
